<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<div>
	<form id="f_config" action="<c:url value='/admin/config/save.do'/>" method="post">
		<input type="hidden" name="config.configId" value="${config.configId}">
		<table id="t_config_detail">
			<tr>
				<th width="75px">名称</th>
				<td>
					<input type="text" name="config.configKey" value="${config.configKey}" size="25"/>
				</td>
			</tr>
			<tr>
			<th width="75px">值</th>
				<td>
					<textarea name="config.configValue" rows="5" cols="20">${config.configValue}</textarea>
				</td>
			</tr>
			<tr>
			<th width="75px">是否可用</th>
				<td>
					<input type="checkbox" id="f_config_enabled" name="config.enabled" value="1"/>
					<script type="text/javascript">
						var configEnabled = "<c:out value='${config.enabled}' />";
						var configEnabledValue = parseInt(configEnabled);
						if(configEnabledValue == 1){
							$("#f_config_enabled").attr("checked",true);
					  	}
					</script>
				</td>
			</tr>
			<tr>
				<th width="75px">描述</th>
				<td>
					<textarea name="config.description" rows="5" cols="20">${config.description}</textarea>
				</td>
			</tr>
			<tr>
				<td><input type="submit" name="保存" value="保存"/></td>
			</tr>
		</table>
	</form>
</div>
